package com.xc.stock.constant;

/**
 * @author xlfd
 * @email xlfd@gmail.com
 * @version 1.0
 * @created Jan 13, 2021 11:53:31 AM
 */
public enum AccountLogType {
	SUBTRACT("SUBTRACT", "扣除"),
	ADD("ADD", "新增"),
	LOCK("LOCK", "冻结"),
	LOCK_SUBTRACT("LOCK_SUBTRACT", "扣除冻结"),
	LOCK_CANCEL("LOCK_CANCEL", "取消冻结"),
	
	WILL_INCOME("WILL_INCOME", "即将收入"),
	WILL_INCOME_REFUND("WILL_INCOME_REFUND", "即将收入_退款"),
	WILL_INCOME_SUCCESS("WILL_INCOME_SUCCESS", "即将收入_进账"),
	;

	String code;
	String remark;
	AccountLogType(String code, String remark) {
		this.code = code;
		this.remark = remark;
	}

	public String code() {
		return code;
	}

	public String remark() {
		return remark;
	}

	public static AccountLogType of(String code) {
		AccountLogType[] values = AccountLogType.values();
		for (AccountLogType e : values) {
			if (e.code.equals(code)) {
				return e;
			}
		}

		return null;
	}
}
